<%
  team_members = @student.team&.students
  sign_in_link = user_token_url(token: @user.original_login_token)
%>

<% content_for :salutation do %>
  <%= t("shared.salutation_name", name: @student.name) %>
<% end %>

<% content_for :body do %>
  <p>
    <%= t("mailers.student.enrollment.body.main_html", course_name: @course.name, school_name: @school.name) %>
  </p>

  <p>
    <%= t("mailers.student.enrollment.body.sign_html", link_to: link_to(t("mailers.student.enrollment.body.link_to", school_name: @school.name), sign_in_link)) %>
  </p>

  <% if team_members.present? %>
    <p>
      <%= t("mailers.student.enrollment.body.team", team_members: team_members.where.not(id: @student.id).map(&:name).to_sentence) %>
    </p>
  <% end %>

  <%= render 'mailers/link_fallback', url: sign_in_link %>

  <p><%= t('shared.login_token_expiration_warning_html', timestamp: @user.login_token_expiration_time, login_url: new_user_session_url) %></p>
<% end %>
